package com.amap.model;

public class Place implements Comparable<Place> {

	public Location location;
	public String idGooglePlaces;
	public String name;
	public String adress;
	public float rating;
	
	
	public Place(Location location, String idGooglePlaces, String name,
			String adress, float rating) {
		super();
		this.location = location;
		this.idGooglePlaces = idGooglePlaces;
		this.name = name;
		this.adress = adress;
		this.rating = rating;
	}
	
	
	public Location getLocation() {
		return location;
	}
	public void setLocation(Location location) {
		this.location = location;
	}
	public String getIdGooglePlaces() {
		return idGooglePlaces;
	}
	public void setIdGooglePlaces(String idGooglePlaces) {
		this.idGooglePlaces = idGooglePlaces;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getAdress() {
		return adress;
	}
	public void setAdress(String adress) {
		this.adress = adress;
	}


	public float getRating() {
		return rating;
	}


	public void setRating(float rating) {
		this.rating = rating;
	}
	
	
	public int compareTo(Place place) {
        if (this.rating < place.rating) {
            return 1;
        }
        if (this.rating > place.rating) {
            return -1;
        }
        return 0;
    }
	
	
	
	
	
	
	
	
}
